// pages/componet/grid/grid.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    courses: {
      type: Array,
    },
    //item是否对齐，如果不对齐则为瀑布流形式，对齐则为2列gridview形式
    rowCount: {
      type: Number,
      value: 2
    }
  },
  attached: function (options) {

  },
  /**
   * 组件的初始数据
   */
  data: {

  },

  /**
   * 组件的方法列表
   */
  methods: {
    _clickShop(event) {
      var _courseNo = event.currentTarget.dataset.courseno
      var _position = event.currentTarget.dataset.position
      var _shopTitle = event.currentTarget.dataset.title
      var _teachername = event.currentTarget.dataset.teachername
      var _teacherrealname = event.currentTarget.dataset.teacherrealname
      var _showfullname = event.currentTarget.dataset.showfullname
      var args = { courseNo: _courseNo, title: _shopTitle, position: _position, teacherName: _teachername, teacheRrealName: _teacherrealname, showFullName: _showfullname }
      this.triggerEvent("onItemClick", args, {});
    }
  }
})